<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/4/1
  Time: 16:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>${title}</title>
</head>
<body>
    <form action="${pageContext.request.contextPath}/${url}" method="post" enctype="application/x-www-form-urlencoded">
        <c:if test="${url=='edit'}"><input type="hidden" name="id" value="${user.id}" placeholder="请输入id"></c:if>
        <table border="1" width="700px">
            <tr>
                <td><label for="name">姓名</label></td>
                <td><input type="text" name="name" id="name" placeholder="请输入姓名" value="${user.name}"></td>
            </tr>
            <tr>
                <td><label for="age">年龄</label></td>
                <td><input type="text" name="age" id="age" placeholder="请输入年龄" value="${user.age}"></td>
            </tr>
            <tr>
                <td><label>性别</label></td>
                <td>
                    <input type="radio" name="gender" value="MALE" title="男" <c:if test="${user.gender.getValue()==1}">checked</c:if>>男
                    <input type="radio" name="gender" value="FEMALE" title="女" <c:if test="${user.gender.getValue()==0}">checked</c:if>>女
                </td>
            </tr>
            <tr>
                <td><label for="email">邮箱</label></td>
                <td><input type="email" name="email" id="email" placeholder="请输入邮箱" value="${user.email}"></td>
            </tr>
            <tr ><td colspan="2"><input type="submit" value="提交"></td></tr>
        </table>
    </form>
</body>
</html>
